summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-05-31 18:36:04 +0200
committerLiam <byteslice@airmail.cc>2024-02-11 19:41:13 +0100
commit865a0186b6db97afed21db6ad924c9968b437265 (patch)
treecf81630a8e2e7bd9028bc650b4de95ffa8e22da0
parentMerge pull request #12986 from t895/input-config-clear-fix (diff)
downloadyuzu-865a0186b6db97afed21db6ad924c9968b437265.tar
yuzu-865a0186b6db97afed21db6ad924c9968b437265.tar.gz
yuzu-865a0186b6db97afed21db6ad924c9968b437265.tar.bz2
yuzu-865a0186b6db97afed21db6ad924c9968b437265.tar.lz
yuzu-865a0186b6db97afed21db6ad924c9968b437265.tar.xz
yuzu-865a0186b6db97afed21db6ad924c9968b437265.tar.zst
yuzu-865a0186b6db97afed21db6ad924c9968b437265.zip
-rw-r--r--src/video_core/buffer_cache/buffer_cache.h2
-rw-r--r--src/video_core/texture_cache/texture_cache.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h
index 6d3d933c5..3818e00f4 100644
--- a/src/video_core/buffer_cache/buffer_cache.h
+++ b/src/video_core/buffer_cache/buffer_cache.h
@@ -35,7 +35,7 @@ BufferCache<P>::BufferCache(Tegra::MaxwellDeviceMemoryManager& device_memory_, R
const s64 min_spacing_critical = device_local_memory - 512_MiB;
const s64 mem_threshold = std::min(device_local_memory, TARGET_THRESHOLD);
const s64 min_vacancy_expected = (6 * mem_threshold) / 10;
- const s64 min_vacancy_critical = (3 * mem_threshold) / 10;
+ const s64 min_vacancy_critical = (2 * mem_threshold) / 10;
minimum_memory = static_cast<u64>(
std::max(std::min(device_local_memory - min_vacancy_expected, min_spacing_expected),
DEFAULT_EXPECTED_MEMORY));
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index a20c956ff..3faff0c2f 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -55,7 +55,7 @@ TextureCache<P>::TextureCache(Runtime& runtime_, Tegra::MaxwellDeviceMemoryManag
const s64 min_spacing_critical = device_local_memory - 512_MiB;
const s64 mem_threshold = std::min(device_local_memory, TARGET_THRESHOLD);
const s64 min_vacancy_expected = (6 * mem_threshold) / 10;
- const s64 min_vacancy_critical = (3 * mem_threshold) / 10;
+ const s64 min_vacancy_critical = (2 * mem_threshold) / 10;
expected_memory = static_cast<u64>(
std::max(std::min(device_local_memory - min_vacancy_expected, min_spacing_expected),
DEFAULT_EXPECTED_MEMORY));
@@ -81,7 +81,6 @@ void TextureCache<P>::RunGarbageCollector() {
if (num_iterations == 0) {
return true;
}
- --num_iterations;
auto& image = slot_images[image_id];
if (True(image.flags & ImageFlagBits::IsDecoding)) {
// This image is still being decoded, deleting it will invalidate the slot
@@ -96,6 +95,7 @@ void TextureCache<P>::RunGarbageCollector() {
if (!high_priority_mode && must_download) {
return false;
}
+ --num_iterations;
if (must_download) {
auto map = runtime.DownloadStagingBuffer(image.unswizzled_size_bytes);
const auto copies = FullDownloadCopies(image.info);